#ifndef __UGEN_MAIN_H__
#define __UGEN_MAIN_H__
#include "ugen_feature.h"

// #define FACTORY_TEST_AP_SSID "U-GEN-606-2.4G"
// #define FACTORY_TEST_AP_PSW  "macro_scope00"
#define FACTORY_TEST_AP_SSID "ugen_factory"
#define FACTORY_TEST_AP_PSW "88888888"

typedef uint8_t (*ugen_cmd_cb_p)(uint16_t *data, uint8_t len);

typedef struct
{
    uint8_t command;           //cmd type code
    ugen_cmd_cb_p ugen_cmd_cb; //callback function
} ugen_cmd_device_table_t;

//typedef uint8_t (*ugen_cmd_cb_p)(uint8_t *data ,uint32_t len );
typedef struct
{
    char *command;             //cmd type code
    ugen_cmd_cb_p ugen_cmd_cb; //callback function
} ugen_cloud_device_table_t;

int TRACE_BINARY(uint8_t *data, uint32_t len);
uint16_t check_sum(uint8_t *data, uint8_t len);
uint8_t ugen_start_ap_config(uint8_t *data, uint32_t len);
void ugen_wifi_state_reply(uint8_t *data, uint8_t len);
void ugen_reset_start(uint8_t *data, uint32_t len);
void hertbeat_reply(uint8_t *data, uint32_t len);
void ugen_send_timeStamp(uint8_t *data, uint32_t len);
void ugen_factory_test(uint8_t *data, uint32_t len);
void check_is_test(void);

#endif //__UGEN_MAIN_H__